package com.triones.yjj.service;

import com.ruoyi.common.core.domain.R;
import com.triones.yjj.entity.bo.WeChatMiniBindPhoneBO;
import com.triones.yjj.entity.bo.WeChatMiniLoginBO;
import com.triones.yjj.entity.bo.WeChatMiniUserInfoBO;
import com.triones.yjj.entity.vo.*;
import org.apache.poi.ss.formula.functions.T;

import java.util.Map;

/**
 * @author cww
 * @version 1.0
 * 2024/7/11 14:35
 */

public interface WeChatManager {

    R<Map> getOpenid(String code);
    /**
     * 获取小程序的code
     * @param code
     * @param userId
     * @return
     */
    R<Map> getMiniOpenid(String code,Long userId);

    /**
     * 设置用户头像昵称
     * @param weChatMiniUserInfoBO
     * @return
     */
    R<WxUserVO> userInfo(WeChatMiniUserInfoBO weChatMiniUserInfoBO);
    /**
     * 微信小程序绑定手机号
     * @param
     * @return
     */
    Map miniBindPhone(WeChatMiniBindPhoneBO weChatMiniBindPhoneBO,MemberDetailVO memberDetailVO);

    WxMemberVO memberWxLogin(ActivityWxInfoVO userId, String openId);

    MemberDetailVO getCacheMember(String token);

    WxStaffVO staffWxLogin(Long userId, String openId);

    WxStaffDetailVO getCacheStaff(String token);

    void reCacheStaff(String token,WxStaffDetailVO wxStaffDetailVO);

    String getPhoneNumber(String code,String openid);

    Map bindPhone(MemberDetailVO memberDetailVO,String mobile,String token);

    /**
     * 微信订阅短链接消息
     * @return
     */
    String generateUrlLink(String path,String query);

    /**
     * 微信小程序二维码图片携带参数
     * @return
     */
    String getMiniCodeImg(String scene,String page);
}
